package admin.member.level.dao;

import java.sql.SQLException;
import java.util.List;

import admin.member.level.dto.LevelDto;

import util.SqlMapLocator;

public class LevelDao {
	private static LevelDao instance = new LevelDao();
	public static LevelDao getInstance() { return instance; }
	private LevelDao() {}
	
	@SuppressWarnings("unchecked")
	public List<LevelDto> list() throws SQLException {
		return (List<LevelDto>)SqlMapLocator.getMapper().queryForList("level.list");
	}
	
	public void insert(LevelDto dto) throws SQLException {
		SqlMapLocator.getMapper().insert("level.insert", dto);
	}
}
